<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
        //无序  不允许重复   es6其实已经有set类
        function Set(){
            this.items = {}

            //add
            Set.prototype.add = function(val){
                if(this.has(val)) return false
                this.items[value]= value
                return true
            }

            //has
            Set.prototype.has = function(val)
            {
               return   this.items.hasOwnProperty(val)
            }

            
        }


        var obj  ={1:'11',2:'22'}

        console.log(obj.size());
        
        delete obj[1]
        console.log(Object.keys(obj));
        console.log('---------');
        
        console.log(Object.values(obj));
         

    </script>
  </body>
</html>
